﻿using Newtonsoft.Json.Linq;
using System;

namespace XbmcManager.Types
{
    public class XbmcMovie
    {
        #region Properties
        private static string TITLE = "title";
        private static string FILE = "file";
        private static string MOVIEID = "movieid";

        public String Title;
        public int Id;
        public String File;
        public readonly static string[] FIELDS = {TITLE, FILE};
        #endregion

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="movie"></param>
        public XbmcMovie(JObject movie)
        {
            //,"movieid" and "label" are pulled back by default
            this.Title = (String)movie[TITLE];
            this.Id = (int)movie[MOVIEID];
            this.File = (String)movie[FILE];
        }
    }
}
